home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Interactive 7
/
PC World Interactive 7.iso
/
program
/
pasprog.EXE
/
REHBER.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1995-12-31
|
4KB
|
103 lines
{Written in the city of Kayseri by Ersin Kecish!}
uses crt;
var f,t:text;
ch:char;
s,z:string;
label again;
begin
textattr:=7;
assign(f,'rehber.tel');
{$i-}reset(f);{$i+}
if ioresult<>0then rewrite(f);
again:
clrscr;
writeln('1) Kayìt ekle');
writeln('2) Kayìt listele');
writeln('3) Kayìt arama');
writeln('4) Kayìt silme');
writeln('5) Kayìt dehishtirme');
writeln('6) Kayìtlarì sìfìrla!');
writeln('7) DOS''a chìkìsh!');
ch:=readkey;if ch=#0then begin ch:=readkey;goto again;end;
case ch of
'1':begin
clrscr;
append(f);
write('Ad soyad.(max.20 harf): ');readln(s);s:=s+' '; s:=copy(s,1,20);write(f,s);
write('Telefon..(max.20 harf): ');readln(s);s:=s+' '; s:=copy(s,1,20);write(f,s);
write('Adres....(max.30 harf): ');readln(s);s:=s+' ';s:=copy(s,1,30);writeln(f,s);
close(f);
end;
'2':begin
clrscr;
writeln('AD SOYAD TELEFON ADRES');
writeln('─────────────────── ─────────────────── ──────────────────────────────');
reset(f);
repeat
readln(f,s);
writeln(s);
until eof(f);
ch:=readkey;if ch=#0then ch:=readkey;
end;
'3':begin
clrscr;
write('Ad soyad.(max.20 harf): ');readln(z);z:=z+' ';z:=copy(z,1,20);
writeln('Aranìyor...');
reset(f);
repeat
readln(f,s);
if copy(s,1,20)=z then
begin
writeln('AD SOYAD TELEFON ADRES');
writeln('─────────────────── ─────────────────── ──────────────────────────────');
writeln(s);
s:='';
write('Aramaya devam?(E/H): ');
repeat ch:=upcase(readkey);until ch in['E','H'];
if ch='E'then begin gotoxy(1,wherey-3);delline;delline;delline;delline;end else break;
end;
until eof(f);
write('Dosya sonu!'#7);
ch:=readkey;if ch=#0then ch:=readkey;
end;
'4':begin
clrscr;
write('Ad soyad.(max.20 harf): ');readln(z);z:=z+' ';z:=copy(z,1,20);
writeln('Aranìyor...');
assign(t,'rehber.tmp'); rewrite(t);
reset(f);
repeat
readln(f,s);
if copy(s,1,20)<>z then writeln(t,s);
until eof(f);
close(f);
close(t);
erase(f);
rename(t,'rehber.tel');
end;
'5':begin
clrscr;
write('Ad soyad.(max.20 harf): ');readln(z);z:=z+' ';z:=copy(z,1,20);
writeln('Aranìyor...');
assign(t,'rehber.tmp'); rewrite(t);
reset(f);
repeat
readln(f,s);
if copy(s,1,20)<>z then writeln(t,s);
until eof(f);
close(f);
close(t);
erase(f);
rename(t,'rehber.tel');
clrscr;
append(f);
write('Yeni Ad soyad.(max.20 harf): ');readln(s);s:=s+' '; s:=copy(s,1,20);write(f,s);
write('Yeni Telefon..(max.20 harf): ');readln(s);s:=s+' '; s:=copy(s,1,20);write(f,s);
write('Yeni Adres....(max.30 harf): ');readln(s);s:=s+' ';s:=copy(s,1,30);writeln(f,s);
close(f);
end;
'6':begin rewrite(f);close(f);end;
'7':begin clrscr;writeln('REHBER V0.0000001 !!! Written by Ersin Kecish in the city of Kayseri'#10#13);halt;end;
end;
goto again;
end.